﻿using RsCms.Application.Posts.Dto;
using RsCode;

namespace RsCms.Application
{
    [ScopedService]
    public interface IPostsAppService
    {
        Task<PostsDto> GetPostsAsync(string id);
        Task<PostsDto> GetPostsBySlugAsync(string slug);
        Task<List<PostsListDto>> QueryPostsAsync();
        Task<PageData<PostsDto>> PagePublishAsync(int page, int pageSize,string date=null);

        Task<PostsDto>SaveAsync(PostEditDto dto);

        Task<PageData<PostsDto>> PageDraftsAsync(int page, int pageSize, string date = null);


        Task<PageData<PostsDto>> PageScheduledAsync(int page, int pageSize, string date = null);

        Task<PageData<PostsDto>> PageAsync(int page, int pageSize);
        Task DeleteAsync(string id);

        Task<PageData<PostsDto>> PageAsync(int page, int pageSize, string tag);

        Task<PostMetaDto> GetPostMetaAsync(string postId);
        Task<PostMetaDto> SavePostMetaAsync(PostMetaDto postMeta);
    }
}
